<?php
/*
 * 宠物图片预览
 */
class PetShowAction extends Action {
    private $page = 1;
    private $avePage = 10;
    /*
    public function __construct() {
        if($this->_request('page','strip_tags')) 
           $this->page = $this->_request('page', 'strip_tags'); 
    }
     */
    public function index() {
        $Model = M('cpcPets');
        $limit = ($this->page-1)*$this->avePage.','.$this->avePage;
        $info = $Model->field(array('id','cover'=>'pic'))->limit($limit)->order('addtime DESC')->select();

        dump($info);
        $this->assign('PetPic', $info);
        //$this->assign('pic', $info);
        $this->display('PetShow');
    }
}
?>

